using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Jonathan
{
    public partial class frmExit : Form
    {
        private FrmMain m_FormMain;

        public frmExit (FrmMain main)
        {
            InitializeComponent();
            this.m_FormMain = main;
        }

        private void btnYes_Click (object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Yes;
            this.m_FormMain.ProgramData.SaveLayoutOnExit = true;
            this.m_FormMain.ProgramData.AskSaveLayoutOnExit = !ckbAsk.Checked;
            this.Close();
        }

        private void btnNo_Click (object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.No;
            this.m_FormMain.ProgramData.SaveLayoutOnExit = false;
            this.m_FormMain.ProgramData.AskSaveLayoutOnExit = !ckbAsk.Checked;
            this.Close();
        }

        private void btnCancel_Click (object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}